package cn.edu.ustc.xrovers.serviceImpl;

import javax.servlet.http.HttpSession;

import cn.edu.ustc.xrovers.dao.LoanIndexDao;
import cn.edu.ustc.xrovers.model.NonFinancialInfoRatio;
import cn.edu.ustc.xrovers.model.ProcessedStatement;
import cn.edu.ustc.xrovers.service.LoanIndexService;

public class LoanIndexServiceImpl implements LoanIndexService{
	
	private LoanIndexDao lid;

	public NonFinancialInfoRatio getQualitativeIndex(String companyId, int year, HttpSession session) {
		NonFinancialInfoRatio nfir=lid.findQualitativeIndex(companyId, year);
		session.setAttribute("nfir", nfir);
		return nfir;
	}
	
	public ProcessedStatement getQuantitativeIndex(String companyId, int year, HttpSession session) {
		ProcessedStatement ps=lid.findQuantitativeIndex(companyId, year);
		session.setAttribute("ps", ps);
		return ps;
	}

	public void setLid(LoanIndexDao lid) {
		this.lid = lid;
	}

	public LoanIndexDao getLid() {
		return lid;
	}
}
